public class Thread3
{
	int i;
	public static void main(String args[])
	{
		MyThread t = new MyThread();
		t.start();

		for(int i=0;i<5;i++)
		{
			System.out.println("b");
		}
	}
}

class MyThread extends Thread
{
	int i;
	public void run()
	{
		while(true)
                {
                        System.out.println("a"+i++);
                        if(i==3)
                        {
                                break;
                        }
                }

	}
}
